#include "MainWindow.h"
#include "ui_MainWindow.h"

#include "FloatingActivator.h"
#include "StackedSettingsDialog.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
#ifdef Q_OS_LINUX
    // 主窗口透明，让底层的桌面显示出来
    setAttribute(Qt::WA_TranslucentBackground);
#endif
    setWindowState(Qt::WindowMaximized);

    m_settingsDialog = new StackedSettingsDialog(this);
    m_floatingActivator = new FloatingActivator(this);
    connect(m_floatingActivator, &FloatingActivator::clicked, [this]()
    {
        m_settingsDialog->exec();
    });
    m_floatingActivator->show();
}

MainWindow::~MainWindow()
{
    delete ui;
}

